package org.fast.develop.logicflow.rest.exception;

/**
 * @author apple
 */
public class ErrorInfos {

	public static void main(String[] args) {
	}

	public enum CommonErr implements ErrorInfoBase {

		SUCCESS("0", "执行成功"),
		ERROR("1", "执行错误"),
		CSRF("2", "请求页面失败"),
		INEMPOTENT("3", "幂等错误,该请求已经消费,不允许重复请求!"),
		PARAM_ERR("1001", "参数错误"),
		REPEAT_ERR("1002", "该字段已存在，不能重复创建！"),
		UPDATE_ID_ERR("1003", "修改时必须输入ID！"),
		SERVER_NOT_EXIST("1002", "后台服务未启动"),
		DATA_NOT_EXIST("1003", "记录不存在"),
		PARAM_MISS("1004", "参数缺失"),
		FILE_UPLOAD_ERR("1005", "文件上传失败"),
		FILE_MAX("1006", "文件太大"),
		FILE_FORMAT_ERR("1007", "文件格式错误"),
		FILE_NOT_EXIST("1008", "文件不存在"),
		SMS_SEND_ERR("1009", "短信发送失败"), DATA_EXIST("1010", "记录已存在"),
		BANK_CARD_ERR("1011", "银行卡号错误"), Bind_ERR("400-1", "Bad Request 参数绑定出错"),
		HttpMessage_Not_Readable_ERR("400-2", "Bad Request 请求参数读取错误"),
		MethodArgument_Not_Valid_ERR("400-3", "Bad Request 请求参数验证失败"),
		HttpRequestMethod_Not_Supported_ERR("405", "Bad Request 请求参数验证失败"),
		;

		private String error_no;

		private String error_info;

		CommonErr(String error_no, String error_info) {
			this.error_no = error_no;
			this.error_info = error_info;
		}

		@Override
		public String getError_no() {
			return error_no;
		}

		@Override
		public String getError_info() {
			return error_info;
		}

	}

	public enum ClientErr implements ErrorInfoBase {

		NO_LOGIN("2000", "未登录或已超时"),
		LOGIN_ERR("2001", "用户名或密码错误"),
		VALIDATE_CODE_ERR("2003",
				"验证码错误"),
		CLIENT_NOT_EXIST("2004", "用户不存在"),
		PUSH_DOWN("2005", "此账号已在其他设备登录"),
		NO_PERMISSION("2006",
						"没有权限"),
		CURRENCY_NOT_EXIST("2007", "货币不存在"),
		PWD_ERR("2008", "密码错误"),
		NO_REALNAME_AUTH("2009",
								"尚未实名认证"),
		NO_REVIEWD_PASS("2010", "尚未审核通过"),
		COL_ACCOUNT_NOT_EXSIT("2011",
										"收款账号不存在"),
		MOBILE_EXIST("2012", "手机号已存在"),
		SHOP_INTERVAL("2013", "定价组异常");
		;

		private String error_no;

		private String error_info;

		ClientErr(String error_no, String error_info) {
			this.error_no = error_no;
			this.error_info = error_info;
		}

		@Override
		public String getError_no() {
			return error_no;
		}

		@Override
		public String getError_info() {
			return error_info;
		}

	}

}
